package com.serviceprovider.business.module.sp.preferences.dao.interfaces;

//~--- non-JDK imports --------------------------------------------------------

import com.serviceprovider.business.module.sp.preferences.model.Preferences;
import com.serviceprovider.business.module.user.model.impl.User;

/**
 * DAO for preferences
 *
 * @author mrduongnv@gmail.com
 *
 */
public interface IPreferencesDao {

    /**
     * Find preferences by user id
     */
    public Preferences findByUserId(int userId);

    /**
     * Insert new record into database
     */
    public Preferences createPreferences(Preferences preferences);

    /**
     * Update preferences record in database
     */
    public void updatePreferences(Preferences preferences);

    /**
     * Save default fee value for the given user
     *
     * @param user - User for which the default fee value will be saved
     * @param fee - Default fee value
     * @return - Save preferences object
     */
    public Preferences saveDefaultFee(User user, Integer fee);
}



